#include <Arduboy2.h>
Arduboy2 arduboy;
#include <ArduboyTones.h>
ArduboyTones sound(arduboy.audio.enabled);
#include <EEPROM.h>
/*=========================================================
                         变量
  =========================================================*/
bool DisplayInvert = false;
unsigned long Timer[5];  //0-标题
int PPTX, PPTY;
/*=========================================================
                         常量
  =========================================================*/
#define mobile_frame_time 150
#define key_cool_time 20
/*=========================================================
                         图片
  =========================================================*/
const uint8_t title[] PROGMEM = {
  0xfe, 0x55, 0xab, 0x7e, 0x80, 0x80, 0x80, 0x7e, 0xab, 0x55, 0xfe, 0x00, 0x00, 0xfe, 0xab, 0xf6, 0x0a, 0x0e, 0xfa, 0x54, 0xf8, 0x00, 0x00, 0xfe, 0xab, 0xf6, 0x0a, 0x0e, 0xfa, 0x56, 0xfa, 0x0e, 0x0a, 0xf6, 0xac, 0xf8, 0x00, 0x00, 0xfc, 0x56, 0xfb, 0x05, 0x07, 0x05, 0x07, 0xfd, 0xab, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0xab, 0xf6, 0x0a, 0x0e, 0xfa, 0x54, 0xf8, 0x00, 0x00, 0xfe, 0xab, 0xf6, 0x0a, 0x0e, 0xfa, 0x54, 0xf8, 0x00, 0x00, 0xfe, 0xab, 0xdd, 0x77, 0x55, 0x6f, 0x36, 0x9c, 0x80, 0x00, 0x00, 0xe0, 0x50, 0xe8, 0x38, 0x28, 0xff, 0xab, 0xff,
  0x00, 0x01, 0x02, 0x05, 0x06, 0x05, 0x06, 0x05, 0x02, 0x01, 0x00, 0x00, 0x00, 0x03, 0x06, 0x07, 0x00, 0x00, 0x83, 0x45, 0xc7, 0x80, 0x00, 0x03, 0x06, 0x87, 0xc0, 0x40, 0x83, 0x05, 0x07, 0x00, 0x80, 0x43, 0xc6, 0x87, 0x00, 0x00, 0x01, 0x83, 0xc6, 0x45, 0xc7, 0x45, 0xc7, 0x45, 0xc6, 0x8d, 0x0e, 0x00, 0x00, 0xc3, 0xc6, 0x87, 0x80, 0x00, 0x03, 0x05, 0xc7, 0x40, 0x80, 0x03, 0x06, 0x07, 0x00, 0x00, 0x03, 0x05, 0x07, 0xc0, 0xc0, 0xc3, 0x06, 0x05, 0x07, 0x05, 0x07, 0x05, 0x06, 0x03, 0x00, 0x00, 0x01, 0x03, 0x06, 0x05, 0x07, 0x05, 0x06, 0x07,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x55, 0xaa, 0x5f, 0xa0, 0x60, 0xa0, 0x7f, 0xea, 0xd5, 0xbf, 0x60, 0xa0, 0x60, 0xbf, 0xd5, 0x6a, 0x3f, 0x00, 0x00, 0x7f, 0xd5, 0xbe, 0x41, 0xc1, 0x41, 0xc1, 0x41, 0xbe, 0xd5, 0x7f, 0x00, 0x00, 0xff, 0xaa, 0xff, 0x02, 0x01, 0x00, 0x00, 0xff, 0x55, 0xff, 0x80, 0x00, 0x00, 0x78, 0xd4, 0xba, 0x4e, 0xca, 0x7f, 0xaa, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const uint8_t PROGMEM cg1[] =
{
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xf8,0x00,0x00,0x00,0x00,0x00,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x57,0xe0,0x00,0x00,0x00,0x01,0xfc,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x22,0x3c,0x00,0x00,0x00,0x1e,0x01,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x55,0x57,0xc0,0x00,0x00,0xe0,0xff,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x88,0x8a,0xfc,0x00,0x0f,0x0f,0xff,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x55,0x40,0x3f,0xc0,0x30,0x7f,0xfe,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xa2,0x87,0xff,0xfd,0xc7,0xfc,0x3e,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x54,0x03,0xff,0xff,0x1f,0xf3,0xdd,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8a,0x01,0xff,0xff,0xcf,0xcf,0xdd,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd4,0x1f,0xff,0xcf,0xe3,0xbf,0xbd,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x80,0x00,0xa2,0x0f,0xff,0x87,0xfb,0x7f,0xba,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0xe0,0x00,0x54,0x0f,0xff,0xff,0xf9,0xff,0x76,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0xf0,0x00,0x68,0x3f,0xfe,0x79,0xfc,0xf6,0xf4,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xfc,0x00,0x34,0x7f,0xff,0x7b,0xfe,0xf9,0xe8,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0xfe,0x00,0x22,0x7f,0xff,0xff,0xfe,0x7f,0xd0,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0xff,0x80,0x34,0xff,0xff,0xff,0xff,0x7f,0xb0,0x00,0x00,0x00,0x00,0x00,0x00,0x7b,0xff,0xc0,0x1a,0xef,0xff,0xff,0xff,0x7f,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x79,0xff,0xe0,0x10,0xcf,0xff,0xff,0xff,0x7c,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x7f,0xf0,0x0a,0x8f,0xff,0xff,0xff,0x7b,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x1f,0xf0,0x04,0x1f,0xf9,0xfe,0x7f,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x07,0xf8,0x03,0x1f,0xf1,0xfc,0x7f,0x5f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x01,0xfc,0x01,0x9f,0xe2,0xf8,0xbf,0x21,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x01,0xfe,0x00,0xdf,0xe6,0xf9,0xbf,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0xff,0x00,0x7f,0xe6,0xf9,0xbf,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x00,0x7f,0x00,0x1f,0xe6,0xf9,0xbe,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x00,0x3f,0x80,0x1f,0xf2,0xfc,0xbf,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x00,0x1f,0xc0,0x7f,0xf9,0xfe,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x0f,0xe0,0x3f,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x0f,0xf0,0x1f,0xff,0xff,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x07,0xf8,0x0f,0xff,0xff,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x03,0xfc,0x07,0xff,0xff,0xff,0x00,0x00,0x1c,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x01,0xfe,0x0f,0xff,0xf7,0xfe,0x00,0x00,0x3f,0x00,0x00,0x00,0x00,0x00,0xfc,0x00,0x01,0xff,0x9f,0xff,0xcf,0xfe,0xe0,0x00,0x77,0x80,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0xff,0x9c,0xff,0xff,0xfc,0x20,0x00,0xfd,0xc0,0x00,0x00,0x00,0x01,0xf0,0x00,0x00,0x7f,0xc2,0x4f,0xff,0xf0,0x20,0x01,0xe7,0xc0,0x00,0x00,0x00,0x03,0xf0,0x00,0x0f,0xbf,0xc8,0x20,0x00,0x20,0x40,0x03,0xc3,0x40,0x00,0x00,0x00,0x07,0xf0,0x00,0x3f,0xcf,0x2e,0x1f,0x95,0x80,0x80,0x07,0xc1,0xc0,0x00,0x00,0x00,0x0f,0xe0,0x00,0x7f,0xf0,0xc3,0x00,0x00,0x03,0x00,0x1f,0xe1,0xc0,0x00,0x00,0x00,0x1f,0xc0,0x01,0xff,0xff,0x09,0xfc,0x00,0x3c,0x00,0x3f,0xf3,0xc0,0x00,0x00,0x00,0xff,0xc0,0x03,0xff,0xf0,0x0c,0x03,0xff,0xc0,0x07,0xff,0xff,0xc0,0x00,0x00,0x03,0xff,0x80,0x07,0xff,0xc0,0x1f,0xe0,0x00,0x01,0xff,0xff,0xff,0x80,0x00,0x00,0x3f,0xff,0x00,0x0f,0xff,0x80,0x1f,0xef,0xff,0x9f,0xff,0xff,0xff,0x00,0x00,0x00,0x0f,0xfe,0x00,0x1f,0xfe,0x00,0x1f,0xcf,0xff,0xdf,0xff,0xff,0xfe,0x00,0x00,0x00,0x07,0xfe,0x00,0x3f,0xfc,0x00,0x3f,0xdf,0xff,0xdf,0xff,0xff,0xf8,0x00,0x00,0x00,0x07,0xfc,0x00,0xff,0xf0,0x00,0x3f,0xdf,0xff,0xcf,0xff,0xff,0xf0,0x00,0x00,0x00,0x0f,0xf8,0x00,0xff,0xe0,0x00,0x7f,0xbf,0xff,0xef,0xff,0xff,0xf0,0x00,0x00,0x00,0x0f,0xf0,0x03,0xff,0xc0,0x00,0x7f,0xbf,0xff,0xef,0xff,0xff,0xc0,0x00,0x00,0x00,0x1f,0xc0,0x07,0xff,0xc0,0x00,0xff,0xbf,0xff,0xe7,0xff,0xff,0x80,0x00,0x00,0x00,0x07,0x80,0x0f,0xff,0x80,0x00,0xff,0x7f,0xff,0xf0,0xff,0xf8,0x00,0x00,0x00,0x00,0x03,0x00,0x1f,0xff,0x00,0x01,0xff,0x7f,0xff,0xf8,0x1f,0xc0,0x00,0x00,0x00,0x00,0x06,0x00,0x3f,0xfe,0x00,0x01,0xff,0x7f,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x7f,0xfe,0x00,0x03,0xff,0x7f,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xfc,0x00,0x03,0xff,0x7f,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xef,0xfc,0x00,0x03,0xfe,0xff,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xc7,0xf8,0x00,0x07,0xfe,0xff,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x38,0x00,0x07,0xfe,0xff,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x38,0x00,0x07,0xfd,0xff,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x10,0x00,0x07,0xfe,0xff,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xfe,0xff,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00
};
const uint8_t PROGMEM cg2[] =
{
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x01, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0xfc, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, 0xfe, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x80, 0x00, 0x03, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x03, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0x03, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0x03, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0x03, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xd0, 0x00, 0x41, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xf0, 0x00, 0x61, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xfc, 0x00, 0x77, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xf8, 0x10, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xfe, 0x40, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x6f, 0xe0, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xfb, 0xc0, 0x57, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xc2, 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xe6, 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x40, 0x1f, 0x00, 0x00, 0x00, 0x07, 0xff, 0xef, 0xeb, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x78, 0xe0, 0x00, 0x00, 0x00, 0x07, 0xff, 0xef, 0xeb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x86, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x7f, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x40, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x01, 0xc0, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x01, 0x80, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x03, 0x80, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xfc, 0x0f, 0xff, 0xfc, 0x00, 0x06, 0x80, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xfe, 0x07, 0xff, 0xf8, 0x00, 0x0e, 0x80, 0x00, 0xf0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xc1, 0xff, 0xe0, 0x00, 0x18, 0x80, 0x00, 0xf8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xf8, 0xff, 0x80, 0x00, 0x30, 0x80, 0x00, 0xfc, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x60, 0x80, 0x00, 0xfe, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xf8, 0x00, 0x00, 0xc0, 0x80, 0x00, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x01, 0x80, 0x80, 0x00, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x80, 0x00, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x80, 0x00, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x80, 0x00, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x80, 0x00, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x80, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x80, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x80, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0x00, 0x80, 0x00, 0xf3, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfe, 0x00, 0x80, 0x00, 0xf8, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x80, 0x00, 0xfc, 0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x80, 0x00, 0xfe, 0x3f, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xfe, 0x00, 0x80, 0x00, 0xff, 0x9f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x80, 0x00, 0xff, 0xe7, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xfc, 0x00, 0x80, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xfc, 0x00, 0x80, 0x00, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x80, 0x00
};
const uint8_t PROGMEM cg3[] =
{
  0xff, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xc0, 0x07, 0xff, 0xff, 0xff, 0x80, 0x01, 0xff, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0xfe, 0x00, 0xf0, 0xff, 0xff, 0xfc, 0x38, 0xf0, 0x7f, 0xff, 0xf8, 0x7c, 0xf0, 0x3f, 0xff, 0xf0, 0x7c, 0x70, 0x3f, 0xff, 0xe0, 0x7e, 0x20, 0x1f, 0xff, 0xc0, 0x3c, 0x00, 0x0f, 0xff, 0x80, 0x08, 0x18, 0x07, 0xff, 0x83, 0x80, 0xfc, 0x07, 0xff, 0x87, 0xc7, 0xfe, 0x07, 0xff, 0x07, 0x8f, 0xfe, 0x07, 0xff, 0x07, 0x0f, 0xfc, 0x03, 0xff, 0x06, 0x1f, 0xfc, 0x03, 0xff, 0x00, 0x1f, 0xf8, 0x03, 0xff, 0x80, 0x7f, 0xf0, 0x03, 0xff, 0x80, 0x7f, 0xe0, 0x01, 0xff, 0xc0, 0x7f, 0xc0, 0x01, 0xff, 0xc0, 0x7f, 0x80, 0x01, 0xff, 0xc0, 0x3f, 0x00, 0x01, 0xff, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x07, 0xff, 0x80, 0x00, 0x00, 0x07, 0xff, 0x80, 0x00, 0x00, 0x07, 0xff, 0x80, 0x00, 0x00, 0x07, 0xff, 0xc0, 0x00, 0x00, 0x07, 0xff, 0xc0, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x00, 0x00, 0x03, 0xff, 0xe0, 0x00, 0x00, 0x03, 0xff, 0xf0, 0x00, 0x00, 0x01, 0xff, 0xf0, 0x00, 0x00, 0x01, 0xff, 0xf8, 0x00, 0x00, 0x01
};
const uint8_t Block_37[] PROGMEM = {
  0xfe, 0x01, 0x01, 0x0f, 0x11, 0x11, 0x11, 0x11, 0x11, 0x15, 0x11, 0x0f, 0x01, 0x02, 0x04, 0xf8,
  0x7f, 0x80, 0xfe, 0x81, 0x81, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x81, 0x81, 0xfe, 0x80, 0x7f,
};
/*=========================================================
                         音乐
  =========================================================*/
const uint16_t sound1[] PROGMEM = {
  262, 480,
  392, 480,
  330, 480,
  349, 480,
  262, 480,
  392, 480,
  330, 480,
  0, 480,
  262, 480,
  392, 480,
  330, 480,
  349, 480,
  262, 480,
  392, 480,
  262, 480,
  0, 480,
  262, 480,
  330, 480,
  392, 480,
  0, 480,
  262, 480,
  330, 480,
  440, 480,
  0, 480,
  262, 480,
  330, 480,
  497, 480,
  0, 480,
  262, 480,
  330, 480,
  262, 480,
  0, 480,
  294, 480,
  330, 480,
  349, 480,
  0, 480,
  330, 480,
  349, 480,
  392, 480,
  0, 480,
  392, 480,
  262, 480,
  294, 480,
  349, 480,
  497, 480,
  0, 480,
  497, 480,
  349, 480,
  392, 480,
  497, 480,
  497, 480,
  0, 480,
  880, 540,
  784, 540,
  659, 540,
  587, 540,
  0, 480,
  587, 540,
  659, 540,
  698, 540,
  0, 480,
  698, 540,
  784, 540,
  880, 540,
  0, 480,
  880, 540,
  523, 540,
  587, 540,
  698, 540,
  988, 540,
  988, 540,
  988, 540,
  880, 540,
  784, 540,
  0, 540,
  587, 480,
  497, 480,
  392, 480,
  0, 480,
  392, 480,
  497, 480,
  349, 480,
  0, 480,
  349, 480,
  440, 480,
  262, 480,
  0, 480,
  440, 480,
  262, 480,
  294, 480,
  0, 480,
  392, 480,
  440, 480,
  349, 480,
  0, 480,
  349, 480,
  294, 480,
  262, 480,
  0, 480,
  330, 480,
  392, 480,
  349, 480,
  0, 480,
  392, 480,
  330, 480,
  262, 480,
  0, 480,
  392, 480,
  330, 480,
  349, 480,
  0, 480,
  392, 480,
  262, 480,
  497, 480,
  587, 480,
  392, 480,
  TONES_END
};
const uint16_t sound2[] PROGMEM = {
  294, 440,
  587, 440,
  497, 440,
  0, 440,
  294, 440,
  587, 440,
  392, 440,
  0, 440,
  294, 440,
  440, 440,
  523, 440,
  0, 440,
  497, 440,
  440, 440,
  349, 440,
  0, 440,
  330, 440,
  349, 440,
  392, 440,
  0, 440,
  392, 440,
  440, 440,
  262, 440,
  0, 440,
  294, 440,
  330, 440,
  349, 440,
  0, 440,
  349, 440,
  392, 440,
  440, 440,
  0, 440,
  523, 440,
  497, 440,
  523, 440,
  587, 440,
  392, 440,
  0, 880,
  523, 440,
  497, 440,
  392, 440,
  0, 440,
  523, 440,
  497, 440,
  330, 440,
  0, 440,
  523, 440,
  497, 440,
  349, 440,
  0, 440,
  440, 440,
  262, 440,
  294, 440,
  0, 440,
  392, 440,
  330, 440,
  349, 440,
  392, 440,
  523, 440,
  0, 440,
  392, 440,
  349, 440,
  330, 440,
  440, 440,
  523, 440,
  0, 440,
  523, 440,
  497, 440,
  587, 440,
  698, 440,
  784, 440,
  988, 440,
  TONES_END
};
/*====================================================================
                             只循环一次
  ====================================================================*/
void setup()
{
  arduboy.boot();
  SetTextColor(0);
  arduboy.invert(DisplayInvert);
  //Serial.begin(115200);
  arduboy.audio.on();
  sound.tones(sound1);
  //Eload();
}
/*====================================================================
                             主程序
  ====================================================================*/
void loop()
{
  draw();
  if (millis() > 60000) {
    sound.tones(sound2);
    while (1) {}
  }
}
/*
   场景虚化
*/
void Blur(int sx, int sy, int ex, int ey, byte f) {
  for (byte y = 0; y < 64; y++) {
    for (byte x = 0; x < 128; x++) {
      if (x % 2 == y % 2 && x % 2 == 0 && x >= sx && x <= ex && y >= sy && y <= ey) arduboy.drawPixel(x + (f > 0 && f < 3), y + (f > 1), 0);
    }
  }
}
/*=========================================================
                     绘图
  =========================================================*/
void draw()
{
  arduboy.clear();
  if (millis() > 3191 && millis() < 10000 && millis() >= 100 + Timer[0]) {
    Timer[0] = millis();
    PPTY++;
  }
  if (millis() < 8682) {
    arduboy.drawBitmap(16, 16 - PPTY, title, 90, 25, 1);
	arduboy.setCursor(12,46 - PPTY);
	arduboy.println(F(" Programming Art "));
	arduboy.setCursor(42,57 - PPTY);
	arduboy.println(F(" LHW "));
  }
  if (millis() > 8682 && millis() < 14486) arduboy.drawSlowXYBitmap(0, 0, cg1, 128, 64, 1); //cg1
  if (millis() > 8682  && millis() < 10911 ) Blur(0, 0, 128, 64, 0);
  if (millis() > 8682  && millis() < 11639 ) Blur(0, 0, 128, 64, 1);
  if (millis() > 16639  && millis() < 24294 ) {
	  SetTextColor(1);
	  arduboy.setCursor(0,1);
	  arduboy.println(F("XUAN does not stand\nfor ruthlessness"));
  }
  if (millis() > 18423  && millis() < 24294 ) {
	  arduboy.setCursor(0,24);
      arduboy.println(F("To the cold world"));
  }
  if (millis() > 21321  && millis() < 24294 ) {
	  arduboy.setCursor(0,40);
      arduboy.println(F("My world warms me"));
  }
  if (millis() > 24295  && millis() < 36100 ) arduboy.drawSlowXYBitmap(0, 0, cg2, 128, 64, 1); //cg2
  if (millis() > 36536) arduboy.drawSlowXYBitmap(88, 3, cg3, 40, 57, 1); //cg4
  if (millis() > 43675) {
	  arduboy.setCursor(0,1);
      arduboy.println(F("Thanks for\naccompanying me"));
  }
  if (millis() > 45426) {
	  arduboy.setCursor(0,24);
      arduboy.println(F("Show me the\nway home"));
  }
  if (millis() > 47368) {
	  arduboy.setCursor(0,48);
      arduboy.println(F("We'll meet\nagain"));
  }
  arduboy.display();
}
void SetTextColor(bool color) {
  arduboy.setTextColor(color);
  arduboy.setTextBackground(!color);
}
void Eload() {
  if (EEPROM.read(512) != 3 ) {
    UpdateROM();
  }
}
/*
   提示更新固件
*/
void UpdateROM() {
  arduboy.clear();
  //arduboy.invert(1);
  arduboy.fillRect(0, 0, 128, 64, 1);
  arduboy.drawBitmap(55, 7, Block_37, 16, 16, 0);
  arduboy.setCursor(4, 39);
  arduboy.print(F("Please upload Part"));
  arduboy.setCursor(120, 39);
  arduboy.print(EEPROM.read(512));
  arduboy.display();
  while (1) {}
}
